package com.wu.company.entity;


import com.wu.company.util.DateTime;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
 * POJO类PrpDuser
 */
@Entity
@Table(name = "PRPDUSER")
public class PrpDuser implements java.io.Serializable {
	private static final long serialVersionUID = 1L;

	/** 属性员工代码 */
	private String userCode;

	/** 属性员工名称 */
	private String userName;

	/** 属性userename */
	private String userename;

	/** 属性密码 */
	private String password;

	/** 属性seal */
	private String seal;

	/** 属性passwordsetdate */
	private Date passwordsetdate;

	/** 属性passwordexpiredate */
	private Date passwordexpiredate;

	/** 属性机构代码 */
	private PrpDcompany prpDcompany;

	/** 属性注销/拒赔（恢复）申请处理机构 */
	private String makeCom;

	/** 属性accountcode */
	private String accountcode;

	/** 属性phone */
	private String phone;

	/** 属性手机 */
	private String mobile;

	/** 属性地址 */
	private String address;

	/** 属性邮编 */
	private String postCode;

	/** 属性电子邮件 */
	private String email;

	/** 属性userflag */
	private String userflag;

	/** 属性loginsystem */
	private String loginsystem;

	/** 属性最新员工代码 */
	private String newUserCode;

	/** 属性效力状态 */
	private String validStatus;

	/** 属性专项代码(对应会计科目) */
	private String articleCode;

	/** 属性标志 */
	private String flag;

	/** 属性maxoverduecount */
	private Integer maxoverduecount;

	/** 属性maxoverduefee */
	private BigDecimal maxoverduefee;

	/** 属性usernature */
	private String usernature;

	/** 属性userlevel */
	private String userlevel;

	/** 属性usertype */
	private String usertype;

	/** 属性issales */
	private String issales;

	/** 属性lastfaillogintime */
	private Date lastfaillogintime;

	/** 属性faillogincount */
	private Integer faillogincount;

	/** 属性prpduserca */
	private Prpduserca prpduserca;
	
	private PrpDuserSub prpDuserSub;
	
	private String flag2;

	/** 属性utiusergrades */
	private List<Utiusergrade> utiusergrades = new ArrayList<Utiusergrade>(0);

	/***
	 * 
	 * 非数据库字段类
	 * **/
	private String newPasswd = ""; // 新密码
    private String repeatPasswd = ""; // 重复密码
    private String sid = ""; // Session ID
    private String remoteAddr = ""; // Remote Addr
    private DateTime loginTime = new DateTime(); // Login time
    private String oldPasswd = "";// 老密码
    private String loginComCode = ""; // 当前登录的机构代码
    private String loginGradeCodes = ""; // 当前登录的岗位代码列表
    private String loginSystemCode = ""; // 当前登录的系统代码
    private String configSystemCode = "";// 当前正在配置的系统代码，主要用于菜单配置
    private String validStatusName = "无效"; // 存储效率状态的中文名称
    // 将validStatus中的0转化为无效1为有效
    private String currentRiskCode = "";
    private String prpDuserFlag2 = ""; // 存储员工类别
    private String lastConfigMenuSystemCode = "";// 最后配置的菜单的系统代码
    private String currentLanguage = "C";//当前登录的语言
    private String comName = "";// 所属机构名称
    
    private String inputCode = "";//当前操作员代码
    
    private String isNot = ""; //是否打印保单

    private PrpDuserSub subDto = new PrpDuserSub();
    private Collection comAgents = new ArrayList();
    //Modify Begin Add By ChenYang 20070605,用户授权登录改造
    private Prpduserca cADto = new Prpduserca();
    //Modify End Add By ChenYang 20070605,用户授权登录改造
    /***************************/
	/**
	 * 类PrpDuser的默认构造方法
	 */
	public PrpDuser() {
	}

	/**
	 * 属性员工代码的getter方法
	 */
	@Id
	@Column(name = "USERCODE")
	public String getUserCode() {
		return this.userCode;
	}

	/**
	 * 属性员工代码的setter方法
	 */
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	/**
	 * 属性员工名称的getter方法
	 */

	@Column(name = "USERNAME")
	public String getUserName() {
		return this.userName;
	}

	/**
	 * 属性员工名称的setter方法
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * 属性userename的getter方法
	 */

	@Column(name = "USERENAME")
	public String getUserename() {
		return this.userename;
	}

	/**
	 * 属性userename的setter方法
	 */
	public void setUserename(String userename) {
		this.userename = userename;
	}

	/**
	 * 属性密码的getter方法
	 */

	@Column(name = "PASSWORD")
	public String getPassword() {
		return this.password;
	}

	/**
	 * 属性密码的setter方法
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * 属性seal的getter方法
	 */

	@Column(name = "SEAL")
	public String getSeal() {
		return this.seal;
	}

	/**
	 * 属性seal的setter方法
	 */
	public void setSeal(String seal) {
		this.seal = seal;
	}

	/**
	 * 属性passwordsetdate的getter方法
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "PASSWORDSETDATE")
	public Date getPasswordsetdate() {
		return this.passwordsetdate;
	}

	/**
	 * 属性passwordsetdate的setter方法
	 */
	public void setPasswordsetdate(Date passwordsetdate) {
		this.passwordsetdate = passwordsetdate;
	}

	/**
	 * 属性passwordexpiredate的getter方法
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "PASSWORDEXPIREDATE")
	public Date getPasswordexpiredate() {
		return this.passwordexpiredate;
	}

	/**
	 * 属性passwordexpiredate的setter方法
	 */
	public void setPasswordexpiredate(Date passwordexpiredate) {
		this.passwordexpiredate = passwordexpiredate;
	}

	/**
	 * 属性机构代码的getter方法
	 */

	@ManyToOne
	@JoinColumn(name = "COMCODE", nullable = false)
	public PrpDcompany getPrpDcompany() {
		return prpDcompany;
	}

	public void setPrpDcompany(PrpDcompany prpDcompany) {
		this.prpDcompany = prpDcompany;
	}
	/**
	 * 属性注销/拒赔（恢复）申请处理机构的getter方法
	 */

	@Column(name = "MAKECOM")
	public String getMakeCom() {
		return this.makeCom;
	}


	/**
	 * 属性注销/拒赔（恢复）申请处理机构的setter方法
	 */
	public void setMakeCom(String makeCom) {
		this.makeCom = makeCom;
	}

	/**
	 * 属性accountcode的getter方法
	 */

	@Column(name = "ACCOUNTCODE")
	public String getAccountcode() {
		return this.accountcode;
	}

	/**
	 * 属性accountcode的setter方法
	 */
	public void setAccountcode(String accountcode) {
		this.accountcode = accountcode;
	}

	/**
	 * 属性phone的getter方法
	 */

	@Column(name = "PHONE")
	public String getPhone() {
		return this.phone;
	}

	/**
	 * 属性phone的setter方法
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
	 * 属性手机的getter方法
	 */

	@Column(name = "MOBILE")
	public String getMobile() {
		return this.mobile;
	}

	/**
	 * 属性手机的setter方法
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	/**
	 * 属性地址的getter方法
	 */

	@Column(name = "ADDRESS")
	public String getAddress() {
		return this.address;
	}

	/**
	 * 属性地址的setter方法
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * 属性邮编的getter方法
	 */

	@Column(name = "POSTCODE")
	public String getPostCode() {
		return this.postCode;
	}

	/**
	 * 属性邮编的setter方法
	 */
	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	/**
	 * 属性电子邮件的getter方法
	 */

	@Column(name = "EMAIL")
	public String getEmail() {
		return this.email;
	}

	/**
	 * 属性电子邮件的setter方法
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * 属性userflag的getter方法
	 */

	@Column(name = "USERFLAG")
	public String getUserflag() {
		return this.userflag;
	}

	/**
	 * 属性userflag的setter方法
	 */
	public void setUserflag(String userflag) {
		this.userflag = userflag;
	}

	/**
	 * 属性loginsystem的getter方法
	 */

	@Column(name = "LOGINSYSTEM")
	public String getLoginsystem() {
		return this.loginsystem;
	}

	/**
	 * 属性loginsystem的setter方法
	 */
	public void setLoginsystem(String loginsystem) {
		this.loginsystem = loginsystem;
	}

	/**
	 * 属性最新员工代码的getter方法
	 */

	@Column(name = "NEWUSERCODE")
	public String getNewUserCode() {
		return this.newUserCode;
	}

	/**
	 * 属性最新员工代码的setter方法
	 */
	public void setNewUserCode(String newUserCode) {
		this.newUserCode = newUserCode;
	}

	/**
	 * 属性效力状态的getter方法
	 */

	@Column(name = "VALIDSTATUS")
	public String getValidStatus() {
		return this.validStatus;
	}

	/**
	 * 属性效力状态的setter方法
	 */
	public void setValidStatus(String validStatus) {
		this.validStatus = validStatus;
	}

	/**
	 * 属性专项代码(对应会计科目)的getter方法
	 */

	@Column(name = "ARTICLECODE")
	public String getArticleCode() {
		return this.articleCode;
	}

	/**
	 * 属性专项代码(对应会计科目)的setter方法
	 */
	public void setArticleCode(String articleCode) {
		this.articleCode = articleCode;
	}

	/**
	 * 属性标志的getter方法
	 */

	@Column(name = "FLAG")
	public String getFlag() {
		return this.flag;
	}

	/**
	 * 属性标志的setter方法
	 */
	public void setFlag(String flag) {
		this.flag = flag;
	}

	/**
	 * 属性maxoverduecount的getter方法
	 */

	@Column(name = "MAXOVERDUECOUNT")
	public Integer getMaxoverduecount() {
		return this.maxoverduecount;
	}

	/**
	 * 属性maxoverduecount的setter方法
	 */
	public void setMaxoverduecount(Integer maxoverduecount) {
		this.maxoverduecount = maxoverduecount;
	}

	/**
	 * 属性maxoverduefee的getter方法
	 */

	@Column(name = "MAXOVERDUEFEE")
	public BigDecimal getMaxoverduefee() {
		return this.maxoverduefee;
	}

	/**
	 * 属性maxoverduefee的setter方法
	 */
	public void setMaxoverduefee(BigDecimal maxoverduefee) {
		this.maxoverduefee = maxoverduefee;
	}

	/**
	 * 属性usernature的getter方法
	 */

	@Column(name = "USERNATURE")
	public String getUsernature() {
		return this.usernature;
	}

	/**
	 * 属性usernature的setter方法
	 */
	public void setUsernature(String usernature) {
		this.usernature = usernature;
	}

	/**
	 * 属性userlevel的getter方法
	 */

	@Column(name = "USERLEVEL")
	public String getUserlevel() {
		return this.userlevel;
	}

	/**
	 * 属性userlevel的setter方法
	 */
	public void setUserlevel(String userlevel) {
		this.userlevel = userlevel;
	}

	/**
	 * 属性usertype的getter方法
	 */

	@Column(name = "USERTYPE")
	public String getUsertype() {
		return this.usertype;
	}

	/**
	 * 属性usertype的setter方法
	 */
	public void setUsertype(String usertype) {
		this.usertype = usertype;
	}

	/**
	 * 属性issales的getter方法
	 */

	@Column(name = "ISSALES")
	public String getIssales() {
		return this.issales;
	}

	/**
	 * 属性issales的setter方法
	 */
	public void setIssales(String issales) {
		this.issales = issales;
	}

	/**
	 * 属性lastfaillogintime的getter方法
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "LASTFAILLOGINTIME")
	public Date getLastfaillogintime() {
		return this.lastfaillogintime;
	}

	/**
	 * 属性lastfaillogintime的setter方法
	 */
	public void setLastfaillogintime(Date lastfaillogintime) {
		this.lastfaillogintime = lastfaillogintime;
	}

	/**
	 * 属性faillogincount的getter方法
	 */

	@Column(name = "FAILLOGINCOUNT")
	public Integer getFaillogincount() {
		return this.faillogincount;
	}

	/**
	 * 属性faillogincount的setter方法
	 */
	public void setFaillogincount(Integer faillogincount) {
		this.faillogincount = faillogincount;
	}

	/**
	 * 属性prpduserca的getter方法
	 */
	@OneToOne(fetch = FetchType.LAZY, mappedBy = "prpDuser",cascade= CascadeType.ALL)
	public Prpduserca getPrpduserca() {
		return this.prpduserca;
	}

	/**
	 * 属性prpduserca的setter方法
	 */
	public void setPrpduserca(Prpduserca prpduserca) {
		this.prpduserca = prpduserca;
	}
	/**
	 * 属性prpduserca的getter方法
	 */
	@OneToOne(fetch = FetchType.LAZY, mappedBy = "prpDuser",cascade= CascadeType.ALL)
	public PrpDuserSub getPrpDuserSub() {
		return prpDuserSub;
	}

	public void setPrpDuserSub(PrpDuserSub prpDuserSub) {
		this.prpDuserSub = prpDuserSub;
	}

	/**
	 * 属性utiusergrades的getter方法
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "prpDuser")
	public List<Utiusergrade> getUtiusergrades() {
		return this.utiusergrades;
	}


	/**
	 * 属性utiusergrades的setter方法
	 */
	public void setUtiusergrades(List<Utiusergrade> utiusergrades) {
		this.utiusergrades = utiusergrades;
	}

	@Transient
	public String getFlag2() {
		return flag2;
	}

	public void setFlag2(String flag2) {
		this.flag2 = flag2;
	}
	@Transient
	public String getNewPasswd() {
		return newPasswd;
	}

	public void setNewPasswd(String newPasswd) {
		this.newPasswd = newPasswd;
	}
	@Transient
	public String getRepeatPasswd() {
		return repeatPasswd;
	}

	public void setRepeatPasswd(String repeatPasswd) {
		this.repeatPasswd = repeatPasswd;
	}
	@Transient
	public String getSid() {
		return sid;
	}

	public void setSid(String sid) {
		this.sid = sid;
	}
	@Transient
	public String getRemoteAddr() {
		return remoteAddr;
	}

	public void setRemoteAddr(String remoteAddr) {
		this.remoteAddr = remoteAddr;
	}
	@Transient
	public DateTime getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(DateTime loginTime) {
		this.loginTime = loginTime;
	}
	@Transient
	public String getOldPasswd() {
		return oldPasswd;
	}

	public void setOldPasswd(String oldPasswd) {
		this.oldPasswd = oldPasswd;
	}
	@Transient
	public String getLoginComCode() {
		return loginComCode;
	}

	public void setLoginComCode(String loginComCode) {
		this.loginComCode = loginComCode;
	}
	@Transient
	public String getLoginGradeCodes() {
		return loginGradeCodes;
	}

	public void setLoginGradeCodes(String loginGradeCodes) {
		this.loginGradeCodes = loginGradeCodes;
	}
	@Transient
	public String getLoginSystemCode() {
		return loginSystemCode;
	}

	public void setLoginSystemCode(String loginSystemCode) {
		this.loginSystemCode = loginSystemCode;
	}
	@Transient
	public String getConfigSystemCode() {
		return configSystemCode;
	}

	public void setConfigSystemCode(String configSystemCode) {
		this.configSystemCode = configSystemCode;
	}
	@Transient
	public String getValidStatusName() {
		return validStatusName;
	}

	public void setValidStatusName(String validStatusName) {
		this.validStatusName = validStatusName;
	}
	@Transient
	public String getCurrentRiskCode() {
		return currentRiskCode;
	}

	public void setCurrentRiskCode(String currentRiskCode) {
		this.currentRiskCode = currentRiskCode;
	}
	@Transient
	public String getPrpDuserFlag2() {
		return prpDuserFlag2;
	}

	public void setPrpDuserFlag2(String prpDuserFlag2) {
		this.prpDuserFlag2 = prpDuserFlag2;
	}
	@Transient
	public String getLastConfigMenuSystemCode() {
		return lastConfigMenuSystemCode;
	}

	public void setLastConfigMenuSystemCode(String lastConfigMenuSystemCode) {
		this.lastConfigMenuSystemCode = lastConfigMenuSystemCode;
	}
	@Transient
	public String getCurrentLanguage() {
		return currentLanguage;
	}

	public void setCurrentLanguage(String currentLanguage) {
		this.currentLanguage = currentLanguage;
	}
	@Transient
	public String getComName() {
		return comName;
	}

	public void setComName(String comName) {
		this.comName = comName;
	}
	@Transient
	public String getInputCode() {
		return inputCode;
	}

	public void setInputCode(String inputCode) {
		this.inputCode = inputCode;
	}
	@Transient
	public String getIsNot() {
		return isNot;
	}

	public void setIsNot(String isNot) {
		this.isNot = isNot;
	}
	@Transient
	public PrpDuserSub getSubDto() {
		return subDto;
	}

	public void setSubDto(PrpDuserSub subDto) {
		this.subDto = subDto;
	}
	@Transient
	public Collection getComAgents() {
		return comAgents;
	}

	public void setComAgents(Collection comAgents) {
		this.comAgents = comAgents;
	}
	@Transient
	public Prpduserca getcADto() {
		return cADto;
	}

	public void setcADto(Prpduserca cADto) {
		this.cADto = cADto;
	}

}
